// ICloudAppCommunication.aidl
package com.android.cloudapp;

import com.android.cloudapp.ICloudAppListener;

interface ICloudAppCommunication {
    /**
     * Send data from cloudapp to app in remote user device.
     *
     * @param  data
     *         the bytes data to be send (max size limited to 5KB).
     *
     * @return  {@code 0}  function call succeeded
     *          {@code -1} function call failed
     *
     * @since   V1.0
     */
    int sendCloudAppData(in byte[] data);

    /**
     * Register a callback which will be invoked when received data from app in remote user device.
     *
     * @param  listener
     *         data receiver
     *
     * @since   V1.0
     */
    void setOnCloudAppRecvDataListener(in ICloudAppListener listener);
}